<template>
  <div class="fl-model" v-if="isShow" @click="close" catchtouchmove>
      <div class="model shadow" >
        <div class="model-title">{{title}}</div>
        <div class="model-content">
          <div v-for="item of list">{{item ? item : '空'}}</div>
        </div>
        <div class="model-button">
          <div class="button-true" @click="close">确定</div>
        </div>
      </div>
    </div>
</template>

<script>
export default {
name: "flModel",
  props: {
    isShow: Boolean,
    title: {
      type: String,
      default: '提示'
    },
    list: {
      type: Array,
      default: ['暂无数据']
    }
  },
  methods: {
    close(){
      this.$emit('isShowClose')
    }
  }
}
</script>

<style scoped lang="scss">
  @keyframes show {
    0% {
      opacity: 0;
    }
    100% {
      opacity: 1;
    }
  }
  .fl-model {
    animation: show 0.5s;
    position: fixed;
    z-index: 1000;
    min-height: 100%;
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: rgb(0,0,0,0.7);
    .model {
      background-color: #FFFFFF;
      width: 650rpx;
      min-height: 280rpx;
      display: flex;
      border-radius: 16rpx;
      flex-direction: column;
      justify-content: space-between;
      padding: 24rpx;
      .model-title {
        padding-bottom: 24rpx;
        border-bottom: 4rpx #EEEEEE solid;
        display: flex;
        justify-content: center;
        font-size: 40rpx;
        font-weight: 700;
      }
      .model-content {
        padding: 24rpx;
        font-weight: 700;
        font-size: 40rpx;
        display: flex;
        flex-direction: column;
        align-content: start;
      }
      .model-button {
        width: 100%;
        display: flex;
        flex-direction: row-reverse;
        .button-true {
          width: 230rpx;
          height: 60rpx;
          display: flex;
          border-radius: 12rpx;
          background-color: #59AC35;
          color: #FFFFFF;
          font-size: 40rpx;
          justify-content: space-around;
          align-items: center;
          font-weight: 700;
        }
      }
    }
  }

</style>
